package com.ty.user.starter.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author minku
 * @since 2021-10-16
 */
@Getter
@Setter
@TableName("ty_role")
@ApiModel(value = "Role对象", description = "角色表")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("角色名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("角色状态 1 可用 0不用")
    @TableField("state")
    private Boolean state;

    /**
     * 不由用户填写,由角色名称的拼音码转换而成
     * 用于shiro中的角色代码保存
     */
    @ApiModelProperty("业务代码")
    @TableField("bus_code")
    private String busCode;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("创建用户Id")
    @TableField("create_user_id")
    private Long createUserId;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("修改用户Id")
    @TableField("update_user_id")
    private Long updateUserId;


}
